package com.quectel.core.module.forum.entity.mongo;

import com.quectel.core.constants.MongoCollectionConstants;
import com.quectel.util.client.mongo.MongoBaseModel;
import lombok.Data;
import org.springframework.data.mongodb.core.index.CompoundIndex;
import org.springframework.data.mongodb.core.index.Indexed;
import org.springframework.data.mongodb.core.mapping.Document;
import org.springframework.data.mongodb.core.mapping.MongoId;

import java.util.Date;
import java.util.List;

/**
 * @author zhangheng
 * @email nolan.zhang@quectel.com
 * @date 2023/5/8 15:52
 * @description 帖子
 */
@Data
@Document(MongoCollectionConstants.FORUM_AUDIT_RECORD)
@CompoundIndex(name = "idx_tenant_author", def = "{'tenantId': 1,'mobileUserId': 1}", background = true)
public class ForumAuditRecordModel implements MongoBaseModel {
    /**
     * id
     */
    @MongoId
    private Long id;

    /**
     * 租户id
     */
    private Long tenantId;

    /**
     * 作者id
     */
    private Long mobileUserId;

    /**
     * 发布内容类型
     */
    private Byte sourceType;

    /**
     * 发布内容Id
     */
    private Long sourceId;

    /**
     * 审核人员
     */
    private Long auditUserId;

    /**
     * 审核结果
     */
    private Byte result;

    /**
     * 违规类型
     */
    private List<Byte> violationTypes;

    /**
     * 备注
     */
    private String remark;

    /**
     * 审核日期
     */
    @Indexed(name = "idx_auditTime", background = true)
    private Date auditTime;
}
